<?php
namespace Cars;
class BMW{
    public function __construct() {
        echo 'hello bmw' . PHP_EOL;// 构造函数
    }
    
    public function __destruct() {
        echo '<br/>i am free'.PHP_EOL;// 析构函数
//        还可以在程序中用unset($x)手动释放实例对象
    }
}
/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

